#! /usr/bin/env python
# -*- coding:utf-8 -*-
# author:无涯

import  requests

def login():
	r=requests.post(
		url='http://47.95.142.233:8000/login/auth/',
		json={"username":"13484545195","password":"asd888"})
	return r.json()['token']

def index():
	r=requests.get(
		url='http://47.95.142.233:8000/interface/index',
		headers={'Authorization':'JWT {0}'.format(login())})
	print(r.status_code)
	print(r.text)
